/* 
 * Copyright (c)	Insighten Intelligent Equipment co.,LTD
 * 
 *  Use of this software is controlled by the terms and conditions found
 *  in the license agreement under which this software has been supplied.
 * 
 */
/** 
 * @file message.h
 * @brief message type use for processes comunication
 * @author taco [tacoee@gmail.com]
 * @version 0.1
 * @date 2010-09-13
 */
#ifndef MESSAGE_H_
#define MESSAGE_H_

#include "types.h"
struct _Message;

typedef struct _Message Message;

struct _Message {
	int qid;
	int key;
	int msg_t_len;
	char msg_t[0];
};

Message *msg_create(int key, int priv_msg_size);
Ret msg_destory(Message *thiz);
Ret msg_destory_deeply(Message *thiz);
int msg_send(Message *thiz);
int msg_rcv(Message *thiz, long mtype);
#endif /*MESSAGE_H_*/
